package top.healthylife.gateway.dto.annotation;


import top.healthylife.gateway.dto.processor.GroupDefaultProcessor;
import top.healthylife.gateway.dto.processor.GroupProcessor;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 接口的参数
 *
 * @author maoxiaomeng
 * @return:
 */
@Target({FIELD})
@Retention(RUNTIME)
@Documented
public @interface ApiField {

    /**
     * 显示名
     */
    String value();

    /**
     * 解释  ,默认会取显示名
     */
    String info() default "";

    /**
     * 是否必填写，默认不必须填写
     */
    boolean necessity() default false;

    /**
     * 分组，分组中默认二选一
     */
    Class<? extends GroupProcessor> group() default GroupDefaultProcessor.class;
}
